package com.baidu.location;

import android.content.Context;
import android.net.Uri;
import android.os.Handler;
import java.io.File;
import java.io.RandomAccessFile;
import java.util.ArrayList;
import org.json.JSONObject;

final class ae
{
  private static String a = "baidu_location_service";
  private static int b = 2048;
  private static int c = 3;
  private static String d;
  private static String e;
  private static String f;
  private static String g;
  private static String h = null;
  private static boolean i = false;
  private static boolean j = false;
  private static boolean k = false;
  private static boolean l = false;
  private static boolean m = false;
  private static ArrayList n = null;
  private static int o = 12000;
  private static Uri p = null;
  private static int q = 4;
  private static String r = "10.0.0.172";
  private static int s = 80;
  private static int t = 0;
  private static Handler u = null;
  private static Handler v = null;
  private static Handler w = null;

  public static void a()
  {
    int i1;
    Object localObject2;
    if (k)
      return;
    k = true;
    if (n == null)
    {
      t = 0;
      n = new ArrayList();
      i1 = 0;
      if (t >= 2)
        break label182;
    }
    for (Object localObject1 = an.a(); ; localObject2 = null)
    {
      if ((localObject1 == null) && (t != 1))
        t = 2;
      label168: label182: 
      while (true)
        try
        {
          String str;
          if (ak.Y == 0)
          {
            f.b();
            localObject1 = n.f();
          }
          do
          {
            do
            {
              int i2;
              do
              {
                if (localObject1 == null)
                  break;
                n.add(localObject1);
                i2 = i1 + ((String)localObject1).length();
                ak.e();
                i1 = i2;
              }
              while (i2 < b);
              if ((n != null) && (n.size() > 0))
                break label168;
              n = null;
              k = false;
              ak.e();
              return;
            }
            while (ak.Y != 1);
            str = n.f();
            localObject1 = str;
          }
          while (str != null);
          localObject1 = f.b();
        }
        catch (Exception localObject2)
        {
          while (true)
          {
            while (true)
              localObject2 = null;
            t = 1;
          }
          ak.e();
          new ah().start();
          return;
        }
    }
  }

  public static void a(Handler paramHandler)
  {
    Object localObject = f.a + "/config.dat";
    try
    {
      localObject = new File((String)localObject);
      if (((File)localObject).exists())
      {
        localObject = new RandomAccessFile((File)localObject, "rw");
        if (((RandomAccessFile)localObject).readBoolean())
        {
          ((RandomAccessFile)localObject).seek(2L);
          int i1 = ((RandomAccessFile)localObject).readInt();
          byte[] arrayOfByte = new byte[i1];
          ((RandomAccessFile)localObject).read(arrayOfByte, 0, i1);
          a(new String(arrayOfByte));
        }
        ((RandomAccessFile)localObject).seek(1L);
        if (((RandomAccessFile)localObject).readBoolean())
        {
          ((RandomAccessFile)localObject).seek(1024L);
          ak.n = ((RandomAccessFile)localObject).readDouble();
          ak.o = ((RandomAccessFile)localObject).readDouble();
          boolean bool = ((RandomAccessFile)localObject).readBoolean();
          ak.r = bool;
          if (bool)
          {
            ak.q = new byte[625];
            ((RandomAccessFile)localObject).read(ak.q, 0, 625);
          }
        }
        ((RandomAccessFile)localObject).close();
      }
      localObject = "&ver=" + ak.s + "&usr=" + ak.f + "&app=" + ak.ak + "&prod=" + ak.al;
      ak.e();
      w = paramHandler;
      a((String)localObject, false);
      return;
    }
    catch (Exception paramHandler)
    {
    }
  }

  public static void a(String paramString, boolean paramBoolean)
  {
    if ((l) || (paramString == null))
      return;
    h = Jni.a(paramString);
    m = paramBoolean;
    l = true;
    new ai().start();
  }

  public static boolean a(Context paramContext)
  {
    if (paramContext == null);
    do
    {
      return false;
      b(paramContext);
    }
    while (q != 3);
    return true;
  }

  public static boolean a(String paramString)
  {
    if (paramString != null);
    try
    {
      paramString = new JSONObject(paramString);
      int i1 = Integer.parseInt(paramString.getString("ver"));
      if (i1 > ak.s)
      {
        String[] arrayOfString;
        ak.s = i1;
        if (paramString.has("gps"))
        {
          ak.e();
          arrayOfString = paramString.getString("gps").split("\\|");
          if (arrayOfString.length > 10)
          {
            if ((arrayOfString[0] != null) && (!(arrayOfString[0].equals(""))))
              ak.t = Float.parseFloat(arrayOfString[0]);
            if ((arrayOfString[1] != null) && (!(arrayOfString[1].equals(""))))
              ak.u = Float.parseFloat(arrayOfString[1]);
            if ((arrayOfString[2] != null) && (!(arrayOfString[2].equals(""))))
              ak.v = Float.parseFloat(arrayOfString[2]);
            if ((arrayOfString[3] != null) && (!(arrayOfString[3].equals(""))))
              ak.w = Float.parseFloat(arrayOfString[3]);
            if ((arrayOfString[4] != null) && (!(arrayOfString[4].equals(""))))
              ak.x = Integer.parseInt(arrayOfString[4]);
            if ((arrayOfString[5] != null) && (!(arrayOfString[5].equals(""))))
              ak.y = Integer.parseInt(arrayOfString[5]);
            if ((arrayOfString[6] != null) && (!(arrayOfString[6].equals(""))))
              ak.z = Integer.parseInt(arrayOfString[6]);
            if ((arrayOfString[7] != null) && (!(arrayOfString[7].equals(""))))
              ak.A = Integer.parseInt(arrayOfString[7]);
            if ((arrayOfString[8] != null) && (!(arrayOfString[8].equals(""))))
              ak.B = Integer.parseInt(arrayOfString[8]);
            if ((arrayOfString[9] != null) && (!(arrayOfString[9].equals(""))))
              ak.C = Integer.parseInt(arrayOfString[9]);
            if ((arrayOfString[10] != null) && (!(arrayOfString[10].equals(""))))
              ak.D = Integer.parseInt(arrayOfString[10]);
          }
        }
        if (paramString.has("up"))
        {
          ak.e();
          arrayOfString = paramString.getString("up").split("\\|");
          if (arrayOfString.length > 3)
          {
            if ((arrayOfString[0] != null) && (!(arrayOfString[0].equals(""))))
              ak.E = Float.parseFloat(arrayOfString[0]);
            if ((arrayOfString[1] != null) && (!(arrayOfString[1].equals(""))))
              ak.F = Float.parseFloat(arrayOfString[1]);
            if ((arrayOfString[2] != null) && (!(arrayOfString[2].equals(""))))
              ak.G = Float.parseFloat(arrayOfString[2]);
            if ((arrayOfString[3] != null) && (!(arrayOfString[3].equals(""))))
              ak.H = Float.parseFloat(arrayOfString[3]);
          }
        }
        if (paramString.has("wf"))
        {
          ak.e();
          arrayOfString = paramString.getString("wf").split("\\|");
          if (arrayOfString.length > 3)
          {
            if ((arrayOfString[0] != null) && (!(arrayOfString[0].equals(""))))
              ak.I = Integer.parseInt(arrayOfString[0]);
            if ((arrayOfString[1] != null) && (!(arrayOfString[1].equals(""))))
              ak.J = Float.parseFloat(arrayOfString[1]);
            if ((arrayOfString[2] != null) && (!(arrayOfString[2].equals(""))))
              ak.K = Integer.parseInt(arrayOfString[2]);
            if ((arrayOfString[3] != null) && (!(arrayOfString[3].equals(""))))
              ak.L = Float.parseFloat(arrayOfString[3]);
          }
        }
        if (paramString.has("ab"))
        {
          ak.e();
          arrayOfString = paramString.getString("ab").split("\\|");
          if (arrayOfString.length > 3)
          {
            if ((arrayOfString[0] != null) && (!(arrayOfString[0].equals(""))))
              ak.M = Float.parseFloat(arrayOfString[0]);
            if ((arrayOfString[1] != null) && (!(arrayOfString[1].equals(""))))
              ak.N = Float.parseFloat(arrayOfString[1]);
            if ((arrayOfString[2] != null) && (!(arrayOfString[2].equals(""))))
              ak.O = Integer.parseInt(arrayOfString[2]);
            if ((arrayOfString[3] != null) && (!(arrayOfString[3].equals(""))))
              ak.P = Integer.parseInt(arrayOfString[3]);
          }
        }
        if (paramString.has("zxd"))
        {
          arrayOfString = paramString.getString("zxd").split("\\|");
          if (arrayOfString.length > 4)
          {
            if ((arrayOfString[0] != null) && (!(arrayOfString[0].equals(""))))
              ak.af = Float.parseFloat(arrayOfString[0]);
            if ((arrayOfString[1] != null) && (!(arrayOfString[1].equals(""))))
              ak.ag = Float.parseFloat(arrayOfString[1]);
            if ((arrayOfString[2] != null) && (!(arrayOfString[2].equals(""))))
              ak.ah = Integer.parseInt(arrayOfString[2]);
            if ((arrayOfString[3] != null) && (!(arrayOfString[3].equals(""))))
              ak.ai = Integer.parseInt(arrayOfString[3]);
            if ((arrayOfString[4] != null) && (!(arrayOfString[4].equals(""))))
              ak.aj = Integer.parseInt(arrayOfString[4]);
          }
        }
        if (paramString.has("gpc"))
        {
          ak.e();
          paramString = paramString.getString("gpc").split("\\|");
          if (paramString.length > 5)
          {
            if ((paramString[0] != null) && (!(paramString[0].equals(""))))
            {
              if (Integer.parseInt(paramString[0]) <= 0)
                break label1297;
              ak.Q = true;
            }
            if ((paramString[1] != null) && (!(paramString[1].equals(""))))
            {
              if (Integer.parseInt(paramString[1]) <= 0)
                break label1304;
              ak.R = true;
            }
            if ((paramString[2] != null) && (!(paramString[2].equals(""))))
              ak.S = Integer.parseInt(paramString[2]);
            if ((paramString[3] != null) && (!(paramString[3].equals(""))))
              ak.U = Integer.parseInt(paramString[3]);
            if ((paramString[4] != null) && (!(paramString[4].equals(""))))
            {
              i1 = Integer.parseInt(paramString[4]);
              if (i1 <= 0)
                break label1311;
              long l1 = i1;
              ak.W = l1;
              l1 = l1 * 1000L * 60L;
              ak.V = l1;
              ak.X = l1 >> 2;
            }
          }
        }
        while (true)
        {
          if ((paramString[5] != null) && (!(paramString[5].equals(""))))
            ak.Y = Integer.parseInt(paramString[5]);
          try
          {
            while (true)
            {
              while (true)
              {
                ak.e();
                return true;
                label1297: ak.Q = false;
              }
              label1304: ak.R = false;
            }
            label1311: ak.j = false;
          }
          catch (Exception paramString)
          {
            return true;
          }
        }
      }
      return false;
    }
    catch (Exception paramString)
    {
    }
    return false;
  }

  public static boolean a(String paramString, Handler paramHandler)
  {
    if ((i) || (paramString == null))
      return false;
    i = true;
    new StringBuilder("bloc : ").append(d);
    ak.e();
    d = Jni.a(paramString);
    new StringBuilder("NUMBER_e : ").append(d.length());
    ak.e();
    new StringBuilder("content: ").append(d);
    ak.e();
    u = paramHandler;
    if (f == null)
      f = an.a();
    new af().start();
    return true;
  }

  public static int b(Context paramContext)
  {
    int i1 = c(paramContext);
    q = i1;
    return i1;
  }

  public static void b()
  {
    Object localObject2 = f.a + "/config.dat";
    if (ak.Q);
    for (int i1 = 1; ; i1 = 0)
    {
      if (ak.R);
      for (int i2 = 1; ; i2 = 0)
      {
        Object localObject1 = String.format("{\"ver\":\"%d\",\"gps\":\"%.1f|%.1f|%.1f|%.1f|%d|%d|%d|%d|%d|%d|%d\",\"up\":\"%.1f|%.1f|%.1f|%.1f\",\"wf\":\"%d|%.1f|%d|%.1f\",\"ab\":\"%.2f|%.2f|%d|%d\",\"gpc\":\"%d|%d|%d|%d|%d|%d\",\"zxd\":\"%.1f|%.1f|%d|%d|%d\"}", new Object[] { Integer.valueOf(ak.s), Float.valueOf(ak.t), Float.valueOf(ak.u), Float.valueOf(ak.v), Float.valueOf(ak.w), Integer.valueOf(ak.x), Integer.valueOf(ak.y), Integer.valueOf(ak.z), Integer.valueOf(ak.A), Integer.valueOf(ak.B), Integer.valueOf(ak.C), Integer.valueOf(ak.D), Float.valueOf(ak.E), Float.valueOf(ak.F), Float.valueOf(ak.G), Float.valueOf(ak.H), Integer.valueOf(ak.I), Float.valueOf(ak.J), Integer.valueOf(ak.K), Float.valueOf(ak.L), Float.valueOf(ak.M), Float.valueOf(ak.N), Integer.valueOf(ak.O), Integer.valueOf(ak.P), Integer.valueOf(i1), Integer.valueOf(i2), Integer.valueOf(ak.S), Integer.valueOf(ak.U), Long.valueOf(ak.W), Integer.valueOf(ak.Y), Float.valueOf(ak.af), Float.valueOf(ak.ag), Integer.valueOf(ak.ah), Integer.valueOf(ak.ai), Integer.valueOf(ak.aj) });
        ak.e();
        localObject1 = ((String)localObject1).getBytes();
        try
        {
          localObject2 = new File((String)localObject2);
          if (!(((File)localObject2).exists()))
          {
            Object localObject3 = new File(f.a);
            if (!(((File)localObject3).exists()))
              ((File)localObject3).mkdirs();
            if (!(((File)localObject2).createNewFile()))
              break label528;
            ak.e();
            localObject3 = new RandomAccessFile((File)localObject2, "rw");
            ((RandomAccessFile)localObject3).seek(0L);
            ((RandomAccessFile)localObject3).writeBoolean(false);
            ((RandomAccessFile)localObject3).writeBoolean(false);
            ((RandomAccessFile)localObject3).close();
          }
          localObject2 = new RandomAccessFile((File)localObject2, "rw");
          ((RandomAccessFile)localObject2).seek(0L);
          ((RandomAccessFile)localObject2).writeBoolean(true);
          ((RandomAccessFile)localObject2).seek(2L);
          ((RandomAccessFile)localObject2).writeInt(localObject1.length);
          ((RandomAccessFile)localObject2).write(localObject1);
          ((RandomAccessFile)localObject2).close();
          label528: return;
        }
        catch (Exception localException)
        {
          return;
        }
      }
    }
  }

  public static boolean b(String paramString, Handler paramHandler)
  {
    if ((j) || (paramString == null))
      return false;
    j = true;
    e = Jni.a(paramString);
    new StringBuilder("bloc : ").append(e);
    ak.e();
    v = paramHandler;
    if (g == null)
      g = an.a();
    new ag().start();
    return true;
  }

  // ERROR //
  private static int c(Context paramContext)
  {
    // Byte code:
    //   0: aload_0
    //   1: ldc_w 450
    //   4: invokevirtual 456	android/content/Context:getSystemService	(Ljava/lang/String;)Ljava/lang/Object;
    //   7: checkcast 458	android/net/ConnectivityManager
    //   10: astore_1
    //   11: aload_1
    //   12: ifnonnull +5 -> 17
    //   15: iconst_4
    //   16: ireturn
    //   17: aload_1
    //   18: invokevirtual 462	android/net/ConnectivityManager:getActiveNetworkInfo	()Landroid/net/NetworkInfo;
    //   21: astore_1
    //   22: aload_1
    //   23: ifnull +475 -> 498
    //   26: aload_1
    //   27: invokevirtual 467	android/net/NetworkInfo:isAvailable	()Z
    //   30: ifne +6 -> 36
    //   33: goto +465 -> 498
    //   36: aload_1
    //   37: invokevirtual 470	android/net/NetworkInfo:getType	()I
    //   40: iconst_1
    //   41: if_icmpne +5 -> 46
    //   44: iconst_3
    //   45: ireturn
    //   46: ldc_w 472
    //   49: invokestatic 478	android/net/Uri:parse	(Ljava/lang/String;)Landroid/net/Uri;
    //   52: putstatic 61	com/baidu/location/ae:p	Landroid/net/Uri;
    //   55: aload_0
    //   56: invokevirtual 482	android/content/Context:getContentResolver	()Landroid/content/ContentResolver;
    //   59: getstatic 61	com/baidu/location/ae:p	Landroid/net/Uri;
    //   62: aconst_null
    //   63: aconst_null
    //   64: aconst_null
    //   65: aconst_null
    //   66: invokevirtual 488	android/content/ContentResolver:query	(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
    //   69: astore_2
    //   70: aload_2
    //   71: ifnull +162 -> 233
    //   74: aload_2
    //   75: invokeinterface 493 1 0
    //   80: ifeq +153 -> 233
    //   83: aload_2
    //   84: aload_2
    //   85: ldc_w 495
    //   88: invokeinterface 498 2 0
    //   93: invokeinterface 501 2 0
    //   98: astore_0
    //   99: aload_0
    //   100: ifnull +66 -> 166
    //   103: aload_0
    //   104: invokevirtual 504	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   107: ldc_w 506
    //   110: invokevirtual 510	java/lang/String:contains	(Ljava/lang/CharSequence;)Z
    //   113: ifeq +53 -> 166
    //   116: invokestatic 515	android/net/Proxy:getDefaultHost	()Ljava/lang/String;
    //   119: astore_0
    //   120: aload_0
    //   121: ifnull +381 -> 502
    //   124: aload_0
    //   125: ldc_w 263
    //   128: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   131: ifne +371 -> 502
    //   134: aload_0
    //   135: ldc_w 517
    //   138: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   141: ifne +361 -> 502
    //   144: aload_0
    //   145: putstatic 67	com/baidu/location/ae:r	Ljava/lang/String;
    //   148: bipush 80
    //   150: putstatic 69	com/baidu/location/ae:s	I
    //   153: aload_2
    //   154: ifnull +346 -> 500
    //   157: aload_2
    //   158: invokeinterface 518 1 0
    //   163: goto +337 -> 500
    //   166: aload_0
    //   167: ifnull +66 -> 233
    //   170: aload_0
    //   171: invokevirtual 504	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   174: ldc_w 520
    //   177: invokevirtual 510	java/lang/String:contains	(Ljava/lang/CharSequence;)Z
    //   180: ifeq +53 -> 233
    //   183: invokestatic 515	android/net/Proxy:getDefaultHost	()Ljava/lang/String;
    //   186: astore_0
    //   187: aload_0
    //   188: ifnull +323 -> 511
    //   191: aload_0
    //   192: ldc_w 263
    //   195: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   198: ifne +313 -> 511
    //   201: aload_0
    //   202: ldc_w 517
    //   205: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   208: ifne +303 -> 511
    //   211: aload_0
    //   212: putstatic 67	com/baidu/location/ae:r	Ljava/lang/String;
    //   215: bipush 80
    //   217: putstatic 69	com/baidu/location/ae:s	I
    //   220: aload_2
    //   221: ifnull +288 -> 509
    //   224: aload_2
    //   225: invokeinterface 518 1 0
    //   230: goto +279 -> 509
    //   233: aload_2
    //   234: ifnull +9 -> 243
    //   237: aload_2
    //   238: invokeinterface 518 1 0
    //   243: iconst_2
    //   244: ireturn
    //   245: astore_0
    //   246: aconst_null
    //   247: astore_0
    //   248: invokestatic 120	com/baidu/location/ak:e	()V
    //   251: aload_0
    //   252: ifnull +173 -> 425
    //   255: aload_0
    //   256: invokevirtual 523	android/net/NetworkInfo:getExtraInfo	()Ljava/lang/String;
    //   259: ifnull +166 -> 425
    //   262: aload_0
    //   263: invokevirtual 523	android/net/NetworkInfo:getExtraInfo	()Ljava/lang/String;
    //   266: invokevirtual 504	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   269: astore_0
    //   270: aload_0
    //   271: ifnull +154 -> 425
    //   274: aload_0
    //   275: ldc_w 525
    //   278: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   281: ifne +23 -> 304
    //   284: aload_0
    //   285: ldc_w 530
    //   288: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   291: ifne +13 -> 304
    //   294: aload_0
    //   295: ldc_w 532
    //   298: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   301: ifeq +37 -> 338
    //   304: invokestatic 515	android/net/Proxy:getDefaultHost	()Ljava/lang/String;
    //   307: astore_0
    //   308: aload_0
    //   309: ifnull +208 -> 517
    //   312: aload_0
    //   313: ldc_w 263
    //   316: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   319: ifne +198 -> 517
    //   322: aload_0
    //   323: ldc_w 517
    //   326: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   329: ifne +188 -> 517
    //   332: aload_0
    //   333: putstatic 67	com/baidu/location/ae:r	Ljava/lang/String;
    //   336: iconst_1
    //   337: ireturn
    //   338: aload_0
    //   339: ldc_w 506
    //   342: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   345: ifeq +37 -> 382
    //   348: invokestatic 515	android/net/Proxy:getDefaultHost	()Ljava/lang/String;
    //   351: astore_0
    //   352: aload_0
    //   353: ifnull +170 -> 523
    //   356: aload_0
    //   357: ldc_w 263
    //   360: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   363: ifne +160 -> 523
    //   366: aload_0
    //   367: ldc_w 517
    //   370: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   373: ifne +150 -> 523
    //   376: aload_0
    //   377: putstatic 67	com/baidu/location/ae:r	Ljava/lang/String;
    //   380: iconst_1
    //   381: ireturn
    //   382: aload_0
    //   383: ldc_w 534
    //   386: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   389: ifne +141 -> 530
    //   392: aload_0
    //   393: ldc_w 536
    //   396: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   399: ifne +131 -> 530
    //   402: aload_0
    //   403: ldc_w 538
    //   406: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   409: ifne +121 -> 530
    //   412: aload_0
    //   413: ldc_w 540
    //   416: invokevirtual 528	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   419: ifeq +6 -> 425
    //   422: goto +108 -> 530
    //   425: invokestatic 515	android/net/Proxy:getDefaultHost	()Ljava/lang/String;
    //   428: astore_0
    //   429: aload_0
    //   430: ifnull +50 -> 480
    //   433: aload_0
    //   434: invokevirtual 118	java/lang/String:length	()I
    //   437: ifle +43 -> 480
    //   440: ldc 65
    //   442: aload_0
    //   443: invokevirtual 543	java/lang/String:trim	()Ljava/lang/String;
    //   446: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   449: ifeq +10 -> 459
    //   452: ldc 65
    //   454: putstatic 67	com/baidu/location/ae:r	Ljava/lang/String;
    //   457: iconst_1
    //   458: ireturn
    //   459: ldc_w 545
    //   462: aload_0
    //   463: invokevirtual 543	java/lang/String:trim	()Ljava/lang/String;
    //   466: invokevirtual 266	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   469: ifeq +11 -> 480
    //   472: ldc_w 545
    //   475: putstatic 67	com/baidu/location/ae:r	Ljava/lang/String;
    //   478: iconst_1
    //   479: ireturn
    //   480: iconst_2
    //   481: ireturn
    //   482: astore_0
    //   483: iconst_4
    //   484: ireturn
    //   485: astore_0
    //   486: aload_0
    //   487: invokevirtual 548	java/lang/Exception:printStackTrace	()V
    //   490: iconst_4
    //   491: ireturn
    //   492: astore_0
    //   493: aload_1
    //   494: astore_0
    //   495: goto -247 -> 248
    //   498: iconst_4
    //   499: ireturn
    //   500: iconst_1
    //   501: ireturn
    //   502: ldc_w 545
    //   505: astore_0
    //   506: goto -362 -> 144
    //   509: iconst_1
    //   510: ireturn
    //   511: ldc 65
    //   513: astore_0
    //   514: goto -303 -> 211
    //   517: ldc 65
    //   519: astore_0
    //   520: goto -188 -> 332
    //   523: ldc_w 545
    //   526: astore_0
    //   527: goto -151 -> 376
    //   530: iconst_2
    //   531: ireturn
    //
    // Exception table:
    //   from	to	target	type
    //   0	11	245	java/lang/SecurityException
    //   17	22	245	java/lang/SecurityException
    //   248	251	482	java/lang/Exception
    //   255	270	482	java/lang/Exception
    //   274	304	482	java/lang/Exception
    //   304	308	482	java/lang/Exception
    //   312	332	482	java/lang/Exception
    //   332	336	482	java/lang/Exception
    //   338	352	482	java/lang/Exception
    //   356	376	482	java/lang/Exception
    //   376	380	482	java/lang/Exception
    //   382	422	482	java/lang/Exception
    //   425	429	482	java/lang/Exception
    //   433	457	482	java/lang/Exception
    //   459	478	482	java/lang/Exception
    //   0	11	485	java/lang/Exception
    //   17	22	485	java/lang/Exception
    //   26	33	485	java/lang/Exception
    //   36	44	485	java/lang/Exception
    //   46	70	485	java/lang/Exception
    //   74	99	485	java/lang/Exception
    //   103	120	485	java/lang/Exception
    //   124	144	485	java/lang/Exception
    //   144	153	485	java/lang/Exception
    //   157	163	485	java/lang/Exception
    //   170	187	485	java/lang/Exception
    //   191	211	485	java/lang/Exception
    //   211	220	485	java/lang/Exception
    //   224	230	485	java/lang/Exception
    //   237	243	485	java/lang/Exception
    //   26	33	492	java/lang/SecurityException
    //   36	44	492	java/lang/SecurityException
    //   46	70	492	java/lang/SecurityException
    //   74	99	492	java/lang/SecurityException
    //   103	120	492	java/lang/SecurityException
    //   124	144	492	java/lang/SecurityException
    //   144	153	492	java/lang/SecurityException
    //   157	163	492	java/lang/SecurityException
    //   170	187	492	java/lang/SecurityException
    //   191	211	492	java/lang/SecurityException
    //   211	220	492	java/lang/SecurityException
    //   224	230	492	java/lang/SecurityException
    //   237	243	492	java/lang/SecurityException
  }

  public static void c()
  {
    Object localObject1 = f.a + "/config.dat";
    try
    {
      localObject1 = new File((String)localObject1);
      if (!(((File)localObject1).exists()))
      {
        Object localObject2 = new File(f.a);
        if (!(((File)localObject2).exists()))
          ((File)localObject2).mkdirs();
        if (!(((File)localObject1).createNewFile()))
          break label173;
        ak.e();
        localObject2 = new RandomAccessFile((File)localObject1, "rw");
        ((RandomAccessFile)localObject2).seek(0L);
        ((RandomAccessFile)localObject2).writeBoolean(false);
        ((RandomAccessFile)localObject2).writeBoolean(false);
        ((RandomAccessFile)localObject2).close();
      }
      localObject1 = new RandomAccessFile((File)localObject1, "rw");
      ((RandomAccessFile)localObject1).seek(1L);
      ((RandomAccessFile)localObject1).writeBoolean(true);
      ((RandomAccessFile)localObject1).seek(1024L);
      ((RandomAccessFile)localObject1).writeDouble(ak.n);
      ((RandomAccessFile)localObject1).writeDouble(ak.o);
      ((RandomAccessFile)localObject1).writeBoolean(ak.r);
      if ((ak.r) && (ak.q != null))
        ((RandomAccessFile)localObject1).write(ak.q);
      ((RandomAccessFile)localObject1).close();
      label173: return;
    }
    catch (Exception localException)
    {
    }
  }
}